package ejb.contentManagement;

import java.util.List;

import ejb.dto.FlightDTO;

public interface FlightMgr {

	/**
	 * Return all FlightDTO
	 * @return all FlightDTO
	 */
	List<FlightDTO> getAllFlightsDTO();

	/**
	 * Return FlightDTO of Flight identified by <code>id</code>
	 * @param id
	 * @return FlightDTO
	 */
	FlightDTO getFlightDTO(int id);

	/**
	 * Delete Flight identified by <code>id</code> from database
	 * @param id
	 * @return <true> if the operation on database is successful, <false> if not
	 */
	boolean deleteFlight(int id);

	/**
	 * Update Flight identified by <code>updatedFlight</code> in database
	 * @param updatedFlight
	 * @return <true> if the operation on database is successful, <false> if not
	 */
	boolean updateFlight(FlightDTO updatedFlight);

	/**
	 * Insert Flight identified by <code>newFlight</code> in database
	 * @param newFlight
	 * @return <true> if the operation on database is successful, <false> if not
	 */
	boolean insertFlight(FlightDTO newFlight);

	/**
	 * Return all depart FlightDTO of Location identified by <code>locationId</code> and Period identified by <code>periodId</code>
	 * @param locationId
	 * @param periodId
	 * @return all depart FlightDTO of one Location and Period
	 */
	List<FlightDTO> getAllDepFlightsByLocation(int locationId, int periodId);

	/**
	 * Return all return FlightDTO of Location identified by <code>locationId</code> and Period identified by <code>periodId</code>
	 * @param locationId
	 * @param periodId
	 * @return all return FlightDTO of one Location and Period
	 */
	List<FlightDTO> getAllRetFlightsByLocation(int locationId, int periodId);

}
